package oop5;

import oop4.Dog;
import oop4.Penguin;
import oop4.Pet;

/**
 * @author oldliu
 * @since 1.0
 */
public class ZooTest {
    public static void main(String[] args) {
        Zoo z=new Zoo("肥东野生动物园");
        Pet pet = z.sell(100000);
        System.out.println("cm³");
        if(pet==null){
            System.out.println("钱少了，没买到");
        }else{
            pet.print();
            if(pet instanceof Dog){
                System.out.println("买了狗");
            }else if(pet instanceof Penguin){
                System.out.println("买了企鹅");
            }
        }
    }
}
